package cn.hanna.springcloud.service.openfeignservice;

import cn.hanna.springcloud.entities.CommonResult;
import cn.hanna.springcloud.entities.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author smileha
 * @create 2021-10-17 17:26
 * @description
 */

@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
public interface PaymentOFService {

    // 跟据id获取支付流水号
    @GetMapping("/payment/get/{id}")
    CommonResult<Payment> getSerialById(@PathVariable("id") Long id);

    // 检验openfeign的超时控制
    @GetMapping("/payment/outtime")
    String checkOutTime();
}
